//解题思路：
//如果要找唯一数，直接异或全部即可
//A ^ A = 0 
//A ^ A ^ B  ==  A ^ B ^ A = B


class Solution
{
public:
    int singleNumber(vector<int>& nums)
    {
        int val = 0;

        for (auto e : nums)
            val ^= e;
        return val;
    }
};